package com.xdap.keymen.controller.punch;

import com.xdap.keymen.service.punch.PunchOrderService;
import com.xdap.keymen.service.punch.PunchService;
import com.xdap.motor.annotation.RestWrapper;
import com.xdap.motor.vo.ResponseVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/custom/punch/order")
@RequiredArgsConstructor
@Slf4j
public class PunchOrderController {

    private final PunchOrderService punchOrderService;
    @GetMapping("/list")
    @RestWrapper
    public ResponseVo getOrderList(Long rv) {
        return punchOrderService.getOrderList(rv);
    }

    @GetMapping("/listItem")
    @RestWrapper
    public ResponseVo getOrderItemList(Long rv) {
        return punchOrderService.getOrderItemList(rv);
    }
}
